package com.to.aboomy.bannersample.slice;

import com.to.aboomy.bannersample.ResourceTable;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Button;
import ohos.agp.components.Component;

public class ViewPager2LunchAbilitySlice extends AbilitySlice implements Component.ClickedListener {

    private Button view1,view3,view4,view5,view6,view7,view8,view9;

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        initView();
    }
    private void initView() {
        view1= (Button) findComponentById(ResourceTable.Id_view1);
        view3= (Button) findComponentById(ResourceTable.Id_view3);
        view4= (Button) findComponentById(ResourceTable.Id_view4);
        view5= (Button) findComponentById(ResourceTable.Id_view5);
        view6= (Button) findComponentById(ResourceTable.Id_view6);
        view7= (Button) findComponentById(ResourceTable.Id_view7);
        view8= (Button) findComponentById(ResourceTable.Id_view8);
        view9= (Button) findComponentById(ResourceTable.Id_view9);
        view1.setClickedListener(this);
        view3.setClickedListener(this);
        view4.setClickedListener(this);
        view5.setClickedListener(this);
        view6.setClickedListener(this);
        view7.setClickedListener(this);
        view8.setClickedListener(this);
        view9.setClickedListener(this);
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }

    @Override
    public void onClick(Component component) {
        switch (component.getId()){
            default:
                break;
        }
    }
}
